package router

import (
	"gateway/cross"
	"gateway/handler/api"
	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	r := gin.Default()
	r.Use(cross.Cors())
	r.POST("/login", api.Login)

	r.POST("/couponCreate", api.CouponCreate)
	r.POST("/couponList", api.CouponList)
	r.POST("/couponUpdate", api.CouponUpdate)
	r.POST("/couponDel", api.CouponDel)
	return r
}
